package me.sealer.ssm.shiro.authc;

import org.apache.shiro.authc.HostAuthenticationToken;
import org.apache.shiro.authc.RememberMeAuthenticationToken;

import java.io.Serializable;

/**
 * 功能描述： $ PhoneToken
 *
 * @author sealer
 * @email 1178884049@qq.com
 * @date 2019年12月05日 16时21分13秒
 */
public class EmailToken implements HostAuthenticationToken, RememberMeAuthenticationToken, Serializable {
    private String email;
    private String password;
    private String host;

    public EmailToken(String email, String password, String host) {
        this.email = email;
        this.password = password;
        this.host = host;
    }

    public EmailToken(String email, String password) {
        this(email, password, null);
    }

    @Override
    public String getHost() {
        return host;
    }

    @Override
    public Object getPrincipal() {
        return email;
    }

    @Override
    public Object getCredentials() {
        return password;
    }

    @Override
    public boolean isRememberMe() {
        return false;
    }
}
